package cn.tedu.ams.entity;

import java.io.Serializable;
import java.sql.Timestamp;

public class Article implements Serializable{

	private static final long serialVersionUID = 1L;
	private Integer id;
	private String title;
	private String content;
	private String dname;
	private Timestamp created;
	private Timestamp updated;
	
	public Article() {
	}
	
	public Article(String title, String content, String dname) {
		super();
		this.title = title;
		this.content = content;
		this.dname = dname;
	}

	public Article(Integer id, String title, String content, String dname, Timestamp created, Timestamp updated) {
		this.id = id;
		this.title = title;
		this.content = content;
		this.dname = dname;
		this.created = created;
		this.updated = updated;
	}
	

	public Article(Integer id, String title, String content, String dname) {
		super();
		this.id = id;
		this.title = title;
		this.content = content;
		this.dname = dname;
	}

	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getDname() {
		return dname;
	}
	public void setDname(String dname) {
		this.dname = dname;
	}
	public Timestamp getCreated() {
		return created;
	}
	public void setCreated(Timestamp created) {
		this.created = created;
	}
	public Timestamp getUpdated() {
		return updated;
	}
	public void setUpdated(Timestamp updated) {
		this.updated = updated;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Article other = (Article) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "Article [id=" + id + ", title=" + title + ", content=" + content + ", dname=" + dname + ", created="
				+ created + ", updated=" + updated + "]";
	}
}
